<template>
  <div id="app">
    <!-- <img alt="Vue logo" src="./assets/logo.png"> -->
    <HelloWorld msg="Welcome to Your Vue.js App"/>

    <button @click="callNative">callNative</button>



  </div>
</template>

<script>
import HelloWorld from './components/HelloWorld.vue'

export default {
  name: 'App',
  components: {
    HelloWorld
  },
  mounted(){
    this.$jsbridge.registerHandler('Test', (data, responseCallback) => {
        console.log("监听到的数据:",data)
        responseCallback("1")
    })
  },
  methods:{
    callNative(){
      this.$jsbridge.callHandler('descriptionIndex',{'param': "你好，这是我JS传递给你的数据"}, (data) => {
          this.contnet = data;
      })
    }
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
